package com.ontheroad.mysql.path.mapper;

import com.ontheroad.path.model.PathUserModel;
import com.ontheroad.path.model.Point;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import org.mybatis.mapper.interfaces.GenericMapper;

import java.util.List;


/**
 * PathUserDAO接口
 *
 * @author admin
 */
public interface PathUserMapper extends GenericMapper<PathUserModel, Long> {
    void updateSportId(Integer sportId);

    void batchSavePoints(List<Point> points);

    List<Point> findPointsByPathUserId(Integer pathUserId);

    List<Point> findPointsByPathSysId(Integer sysId);

    List<Integer> findNearPath(@Param("lngMin") double lngMin, @Param("lngMax") double lngMax, @Param("latMin") double latMin, @Param("latMax") double latMax, @Param("rowBounds") RowBounds rowBounds);

    List<PathUserModel> findPathByIds(List<Integer> userPathIds);
}
